<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let i = 0
        //判断是否符合条件，复合进入循环，不符合跳过循环
        while (i < 3) {
            document.write(i + '</br>')
            //必写的变化量
            i++
        }
        document.write('循环结束')
    </script>
</body>

</html>